﻿namespace FactoryMethod
{
    internal abstract class Factory
    {
        public Product Create(string owner) 
        {
            var p = this.CreateProduct(owner);
            RegisterProduct(p);
            return p;
        }

        protected abstract Product CreateProduct(string owner);
        protected abstract void RegisterProduct(Product product);
    }
}
